package com.web.jdbcbase.service.impl;

import java.util.List;
import java.util.Map;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.web.jdbcbase.dao.RoleDao;
import com.web.jdbcbase.module.Menu;
import com.web.jdbcbase.module.Role;
import com.web.jdbcbase.service.RoleService;
@Service("roleService")
public class RoleServiceImpl implements RoleService{
	@Resource
	private RoleDao roleDao;
	@Override
	public List<Role> queryRole(Role role) {
		return this.roleDao.queryRole(role);
	}

	@Override
	public List<Map> queryRoleMap(Role role) {
		return this.roleDao.queryRoleMap(role);
	}

	@Override
	public Role queryRoleForOne(String str) {
		return this.roleDao.queryRoleForOne(str);
	}

	@Override
	@Transactional("transactionManager2")
	public int insertRole(Role role) {
		this.roleDao.insertRole(role);
		//System.out.println(1/0);
		return 0;
	}

}
